package day16.udp的练习1;

import java.io.IOException;
import java.net.*;
import java.util.Scanner;

public class Send {
    public static void main(String[] args) throws IOException {
        DatagramSocket ds=new DatagramSocket();
        Scanner sc=new Scanner(System.in);
        while (true) {
            String s=sc.nextLine();
            if ("886".equals(s)){
                break;
            }
            byte[]  byts=s.getBytes();
            DatagramPacket dp=new DatagramPacket(byts,byts.length, InetAddress.getByName( "192.168.23.58" ),10086);
       ds.send(dp);
        }
ds.close();


    }
}
